package org.upo.eps.it.phama.bean;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class DetallePedCliId implements Serializable {
    
    @Column(name = "ID_DETALLE")
    private int idDetalle;
    
    @Column(name = "ID_PEDIDO_CLI")
    private int idPedidoCli;

    //<editor-fold defaultstate="collapsed" desc="constructors">
    public DetallePedCliId() {
    }
    
    public DetallePedCliId(int idDetalle, int idPedidoCli) {
        this.idDetalle = idDetalle;
        this.idPedidoCli = idPedidoCli;
    }
    //</editor-fold>
    
    //<editor-fold defaultstate="collapsed" desc="getters & setters">
    public int getIdDetalle() {
        return this.idDetalle;
    }
    
    public void setIdDetalle(int idDetalle) {
        this.idDetalle = idDetalle;
    }
    
    public int getIdPedidoCli() {
        return this.idPedidoCli;
    }
    
    public void setIdPedidoCli(int idPedidoCli) {
        this.idPedidoCli = idPedidoCli;
    }
    //</editor-fold>
    
    @Override
    public boolean equals(Object other) {
        if ((this == other)) {
            return true;
        }
        if ((other == null)) {
            return false;
        }
        if (!(other instanceof DetallePedCliId)) {
            return false;
        }
        DetallePedCliId castOther = (DetallePedCliId) other;        
        
        return (this.getIdDetalle() == castOther.getIdDetalle())
                && (this.getIdPedidoCli() == castOther.getIdPedidoCli());
    }
    
    @Override
    public int hashCode() {
        int result = 17;
        
        result = 37 * result + this.getIdDetalle();
        result = 37 * result + this.getIdPedidoCli();
        return result;
    }    

}
